home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CUJ9207.ARJ / 1007030A < prev    next >
Text File  |  1992-06-03  |  675b  |  30 lines

  1. // Main is called by Liana to start the application
  2. main
  3. {
  4.   // Create and show a window.
  5.   (w = new window).show;
  6. }
  7.  
  8. // Paint is called by Liana to update window.
  9. // Note that it queries the current window
  10. // size to calculate the graphic coordinates.
  11.  
  12. paint
  13. {
  14.   // Some text.
  15.   w << "Hello World";
  16.  
  17.   // Diagonal line from upper left to lower right.
  18.   w.line (0, 0, w.width, w.height);
  19.  
  20.   // Circle in middle of screen.
  21.   int x = w.width / 2;
  22.   int y = w.height / 2;
  23.   int r = min (w.width, w.height) / 4;
  24.   w.circle (x, y, r);
  25.  
  26.   // Rectangle around the circle.
  27.   w.rectangle (x - r - 30, y - r - 10,
  28.                x + r + 30, y + r + 10);
  29. }
  30.